package generator.domain;

import java.util.Date;

/**
 * 
 * @TableName entry_tags
 */
public class EntryTags {
    /**
     * 
     */
    private Integer entryId;

    /**
     * 
     */
    private Integer tagId;

    /**
     * 
     */
    private Date createdAt;

    /**
     * 
     */
    public Integer getEntryId() {
        return entryId;
    }

    /**
     * 
     */
    public void setEntryId(Integer entryId) {
        this.entryId = entryId;
    }

    /**
     * 
     */
    public Integer getTagId() {
        return tagId;
    }

    /**
     * 
     */
    public void setTagId(Integer tagId) {
        this.tagId = tagId;
    }

    /**
     * 
     */
    public Date getCreatedAt() {
        return createdAt;
    }

    /**
     * 
     */
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EntryTags other = (EntryTags) that;
        return (this.getEntryId() == null ? other.getEntryId() == null : this.getEntryId().equals(other.getEntryId()))
            && (this.getTagId() == null ? other.getTagId() == null : this.getTagId().equals(other.getTagId()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getEntryId() == null) ? 0 : getEntryId().hashCode());
        result = prime * result + ((getTagId() == null) ? 0 : getTagId().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", entryId=").append(entryId);
        sb.append(", tagId=").append(tagId);
        sb.append(", createdAt=").append(createdAt);
        sb.append("]");
        return sb.toString();
    }
}